package lily.phs.entertain;


import lily.phs.urh.R;
import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;
import android.widget.MediaController;
import android.widget.VideoView;

public class VideoViewActivity extends Activity{
	
	@Override
	public void onCreate(Bundle savedInstanceState){
		super.onCreate(savedInstanceState);
		this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); 
		this.requestWindowFeature(Window.FEATURE_NO_TITLE);
		
		this.setContentView(R.layout.video_view);
		String name=getIntent().getExtras().getString("name");
		VideoView videoView = (VideoView) this.findViewById(R.id.video1); 
		MediaController controller=new MediaController(this);
		videoView.setMediaController(controller);
        
		videoView.setVideoPath("/sdcard/video/"+name);
		videoView.start();
	}

}
